{% extends "admin/admin_page.html" %}

{% load trix_translations %}

{% block content %}
<div class="container-fluid">
	<div class="row-fluid">
		<div class="span4">
			<h2>{% translate "admin_pillars" %}</h2>
			<a href="{% url admin_pillar_edit %}" class="btn">{% translate "admin_new_pillar" %}</a>
			<ul>
				{% for pillar in pillars %}
					<li><a href="{% url admin_pillar pillar.id %}">{{ pillar }}</a></li>
				{% endfor %}
			</ul>
		</div>
		<div class="span4">
			<h2>{% translate "admin_update_death_stat_title" %}</h2>
			<p>
				{% if death_count %}
					{% translate "admin_latest_death_count" %}: {{ death_count }}
				{% else %}
					{% translate "admin_no_death_stat" %}
				{% endif %}
			</p>
			<form action="{% url admin_death_count %}" method="post">
				{{ death_count_form.as_p }}
				<input type="submit" class="btn" value="{% translate "admin_update_death_stat_button" %}">
			</form>
		</div>
        <div class="span4">
          <h2>Upload a CSV</h2>
          <form action="{% url admin_pillar_massupload %}" method="post" enctype="multipart/form-data">
            {% csrf_token %}
            <p>{{ form.non_field_errors }}</p>
            <p>{{ form.docfile.label_tag }}</p>
            <p>
                {{ form.docfile.errors }}
                {{ form.docfile }}
            </p>
            <p><input type="submit" value="Upload" /></p>
        </form>
	</div>
</div>
{% endblock %}
